package com.ykq.system.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.aaa.common.entity.AclPermission;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface AclPermissionDao extends BaseMapper<AclPermission> {

    /**
     * 根据用户id查询权限信息
     * @return 不想写映射文件
     */
    @Select(value = "select p.* from acl_permission p join acl_role_permission rp on p.id=rp.permission_id " +
            "join acl_user_role ur on ur.role_id=rp.role_id where ur.user_id=#{userid}")
    public List<AclPermission> selectByUserid(Long userid);
}
